import configparser


class NewConfigParser(configparser.ConfigParser):
    def optionxform(self, optionstr):
        return optionstr

    def trans_dict(self):
        d = dict(self._sections)
        for k in d:
            d[k] = dict(d[k])
        return d


def read_ini(path):
    config = NewConfigParser()
    config.read(path, encoding='utf-8')
    ini_dict = config.trans_dict()
    return ini_dict


if __name__ == '__main__':
    read_ini('../../privacy/settings.ini')
